// START SNIPPET: NutritionDaoHibernate
package nothing.dao.hibernate;

import nothing.model.Nutrition;
import nothing.dao.NutritionDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class NutritionDaoHibernate extends GenericDaoHibernate<Nutrition, Long> implements NutritionDao {

    public NutritionDaoHibernate() {
        super(Nutrition.class);
    }

    @SuppressWarnings("unchecked")
    public List<Nutrition> findByName(String name) {
        return getHibernateTemplate().find("from Nutrition where name=?", name);
    }
}
// START SNIPPET: NutritionDaoHibernate

